Rasakan mudahnya Cari Mobil di Aplikasi Mobilman.ID

Iklan Terbaru

Cari Mobil Bekas Dijual dari Berbagai Merek hanya di Mobilman.id

Cari Mobil Di Kota Anda

Dengan banyak pilihan mobil, Anda dapat cari mobil bekas dijual dari setiap kota di seluruh Indonesia

Review Mobil

Sebelum cari mobil dijual, baca dulu Review lengkap dari Mobilman.id


`); }, success: function(data) { $("#dataHit").html(''); for (var i in data) { const el = data[i]; var carurl = el.image_avatar; var carurloptimole; if (el.image_avatar == undefined) { carurloptimole = "https://mobilman.id/index/C_index/resizeImage/" + encodeURIComponent(el.image_avatar); } else { if (el.image_avatar.substr(0, 5) == 'https') { carurl = el.image_avatar; carurloptimole = el.image_avatar; } else { carurl = el.image_avatar; carurloptimole = el.image_avatar; } } var titlePost = el.post_title; // if (el.post_title.length > 25) { // titlePost = el.post_title.substring(0, 22) + '...'; // } var isSold = '', isSundul = ''; if (el.post_status == 'sold') { isSold = ''; } if (el.is_up == '1') { isSundul = ''; } var ht = `
${(isSold=='')?isSundul:isSold}
Rp ${number_format(el.car_price,0,',','.')}

 ${convertDate(new Date(el.post_date))}

`; $("#dataHit").append(ht); } } }) } function showPosition(position) { localStorage.setItem('latuser', position.coords.latitude); localStorage.setItem('lnguser', position.coords.longitude); } function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { alert("Geolocation is not supported by this browser."); } } -->

Cari Mobil Dijual?

Temukan hingga 8401 iklan mobil disini

Cariin Mobil ` } var indicator = `
  • ` if(i == 3){ var htcarousel = `
    ${tcarousel}
    ` }else{ var htcarousel = `
    ${tcarousel}
    ` } $("#indicatorCarousel").append(indicator); $("#carouselImg").append(htcarousel); } } if (el.facebook != undefined) { $("#facebookID").attr('href', 'https://www.facebook.com/' + el.facebook); } if (el.twitter != undefined) { $("#twitterID").attr('href', 'https://www.twitter.com/' + el.twitter); } if (el.instagram != undefined) { $("#instagramID").attr('href', 'https://www.instagram.com/' + el.instagram); } if (el.linkedin != undefined) { $("#linkedinID").attr('href', '' + el.linkedin); } if (el.youtube != undefined) { $("#youtubeID").attr('href', '' + el.youtube); } if (el.site_title != undefined && "" != 'ad' && "" != 'blog' && "" != 'review-mobil' && "" != 'mobil-bekas') { $("title").html(el.site_title); } if (el.meta_keyword != undefined && "" != 'mobil-bekas') { $("meta[name='keywords']").attr('content', el.meta_keyword); } if (el.description != undefined) { $("#description").html(el.description); } } getLanguage($currentLang); } }) } function ClickLogin() { clicked = true; } function onSignIn(googleUser) { if (clicked) { var profile = googleUser.getBasicProfile(); } // console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead. var name = profile.getName(); var avatar = profile.getImageUrl(); var email = profile.getEmail(); // This is null if the 'email' scope is not present. // The ID token you need to pass to your backend: var id_token = googleUser.getAuthResponse().id_token; $.ajax({ url: "auth_google", method: 'post', data: { name: profile.getName(), email: profile.getEmail() }, dataType: 'json', success: function(data) { // window.location.reload(); // toastr.success(data.msg, 'Information'); if (data.msg == "username_not_registered") { $(".modalRegister").modal('show'); setTimeout(() => { $("#inputNamaLengkap").val(name); $("#inputEmail").val(email); $("#inputIdToken").val(id_token); $("#inputAvatar").val(avatar); }, 500); // registerUser(name,email,avatar,id_token); // signOutGoogle(); } else { toastr.success("success", 'Information'); if (data.row.roleid == '2' || data.row.roleid == '9999') { window.location.href = 'adm/dashboard'; } else { window.location.href = 'profile'; } } } }) } function onSignUp(googleUser) { if (clicked) { var profile = googleUser.getBasicProfile(); } var name = profile.getName(); var avatar = profile.getImageUrl(); var email = profile.getEmail(); // This is null if the 'email' scope is not present. // The ID token you need to pass to your backend: var id_token = googleUser.getAuthResponse().id_token; $.ajax({ url: "auth_google", method: 'post', data: { name: profile.getName(), email: profile.getEmail() }, dataType: 'json', success: function(data) { // window.location.reload(); // toastr.success(data.msg, 'Information'); if (!data.success) { $(".modalRegister").modal('show'); setTimeout(() => { $("#inputNamaLengkap").val(name); $("#inputEmail").val(email); $("#inputIdToken").val(id_token); $("#inputAvatar").val(avatar); }, 500); } else { toastr.success("success", 'Information'); if (data.row.roleid == '2' || data.row.roleid == '9999') { window.location.href = 'adm/dashboard'; } else { window.location.href = 'profile'; } } } }) } function loginGoogle(name, email) { $.ajax({ url: "auth_google", method: 'post', data: { name: name, email: email }, dataType: 'json', success: function(data) { // window.location.reload(); if (data.success) { toastr.success("success", 'Information'); if (data.row.roleid == '2' || data.row.roleid == '9999') { window.location.href = 'adm/dashboard'; } else { window.location.href = 'profile?tab=edit'; } } } }) } function registerUser(nama_lengkap, email, avatar, id_token) { var obj = { nama_lengkap, email, avatar, id_token, type: 'ajax' } $.ajax({ url: "act/registration", method: 'post', data: obj, dataType: 'json', success: function(data) { // window.location.reload(); // toastr.success(data.msg, 'Information'); loginGoogle(nama_lengkap, email); } }) } function registerVerifyUser() { var obj = { nama_lengkap: $("#inputNamaLengkap").val(), email: $("#inputEmail").val(), avatar: $("#inputAvatar").val(), no_handphone: $("#inputNomorHandphone").val(), whatsapp_number: $("#inputNomorWhatsapp").val(), password: $("#inputPassword").val(), id_token: $("#inputIdToken").val(), type: 'ajax' } $.ajax({ url: "act/registration", method: 'post', data: obj, dataType: 'json', beforeSend: function() { $("#custLoader").show(); }, success: function(data) { $("#custLoader").hide(); // window.location.reload(); // toastr.success(data.msg, 'Information'); if (data.success) { loginGoogle(obj.nama_lengkap, obj.email); } else { toastr.warning(data.msg, 'Oops'); } } }) } function onLoad() { gapi.load('auth2', function() { gapi.auth2.init(); }); } function signOutGoogle() { var auth2 = gapi.auth2.getAuthInstance(); auth2.signOut().then(function() { console.log('User signed out.'); }); } logInWithFacebook = function() { FB.login(function(response) { if (response.authResponse) { setCookie('accessToken', response.authResponse.accessToken, '10'); $.ajax({ url: "auth_fb", method: 'post', data: { data: response.authResponse }, dataType: 'json', success: function(data) { debugger; } }) // Now you can redirect the user or do an AJAX request to // a PHP script that grabs the signed request from the cookie. } else { alert('User cancelled login or did not fully authorize.'); } }); return false; }; window.fbAsyncInit = function() { FB.init({ appId: '277067360172454', cookie: true, // This is important, it's not enabled by default version: 'v2.10' }); }; // (function(d, s, id) { // var js, fjs = d.getElementsByTagName(s)[0]; // if (d.getElementById(id)) { // return; // } // js = d.createElement(s); // js.id = id; // js.src = "//connect.facebook.net/en_US/sdk.js"; // fjs.parentNode.insertBefore(js, fjs); // }(document, 'script', 'facebook-jssdk')); function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function loadJsonFile(lang, cb) { fetch("https://mobilman.id/locales/" + lang + "/translation.json").then(res => res.text()).then(text => { return cb(text) }); } function convertDate(ts) { var mth = $month[ts.getMonth()] || "-"; return ts.getDate() + ' ' + mth + ' ' + ts.getFullYear(); } function confirmDeleteAccount() { $.ajax({ url: api_url + 'delete_account', method: 'get', dataType: 'json', success: function(data) { if (data.success) { toastr.success(data.msg, 'Success'); setTimeout(() => { window.location.reload(); }, 1000); } else { toastr.error(data.msg, 'Whoops'); } }, error: function(xhr) { toastr.error(xhr.status + ' - ' + xhr.statusText, 'An Error Occured'); } }) } function number_format(number, decimals, decPoint, thousandsSep) { number = (number + '').replace(/[^0-9+\-Ee.]/g, '') var n = !isFinite(+number) ? 0 : +number // var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals) var prec = 0 var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep var dec = (typeof decPoint === 'undefined') ? '.' : decPoint var s = '' var toFixedFix = function(n, prec) { var k = Math.pow(10, prec) return '' + (Math.round(n * k) / k) .toFixed(prec) } // @todo: for IE parseFloat(0.55).toFixed(0) = 0; s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.') if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep) } if ((s[1] || '').length < prec) { s[1] = s[1] || '' s[1] += new Array(prec - s[1].length + 1).join('0') } return s.join(dec) } function validate(evt) { var theEvent = evt || window.event; // Handle paste if (theEvent.type === 'paste') { key = event.clipboardData.getData('text/plain'); } else { // Handle key press var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode(key); } var regex = /[0-9]|\./; if (!regex.test(key)) { theEvent.returnValue = false; if (theEvent.preventDefault) theEvent.preventDefault(); } } function openVerify() { $.ajax({ url: 'https://mobilman.id/send_verify_phone', dataType: 'json', method: 'post', beforeSend: function() { $("#custLoader").show(); }, success: function(data) { $("#custLoader").hide(); $(".modalVerifikasi").modal('show'); } }) } $('.digit-group').find('input').each(function() { $(this).attr('maxlength', 1); $(this).on('keyup', function(e) { var parent = $($(this).parent()); if (e.keyCode === 8 || e.keyCode === 37) { var prev = parent.find('input#' + $(this).data('previous')); if (prev.length) { $(prev).select(); } } else if ((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode >= 65 && e.keyCode <= 90) || (e.keyCode >= 96 && e.keyCode <= 105) || e.keyCode === 39) { var next = parent.find('input#' + $(this).data('next')); if (next.length) { $(next).select(); } else { if (parent.data('autosubmit')) { parent.submit(); } } } }); }); $(".inputs").keyup(function() { if (this.value.length == this.maxLength) { $(this).next('.inputs').focus(); } }); $("#formVerify").submit(function() { var val = $(this).serialize(); $.ajax({ url: 'https://mobilman.id/verify_phone', method: 'post', data: val, dataType: 'json', beforeSend: function() { $("#custLoader").show(); }, success: function(data) { $("#custLoader").hide(); if (data.success) { toastr.success(data.msg); window.location.reload(); } else { toastr.error(data.msg); } } }) }) -->